﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Automobile.service.Model;
using Automobile.service.DAL;
namespace Automobile.service.BLL
{
   public class ProductBLL
    {
       ProductDAL DAL = new ProductDAL();
        /// <summary>
        /// 获取商品信息
        /// </summary>
        /// <returns></returns>
        public List<Product> ShowProduc()
        {
            return DAL.ShowProduc();
        }
        /// <summary>
        /// 获取商品信息总数
        /// </summary>
        /// <returns></returns>
        public int CountProduc()
        {
            return DAL.CountProduc();
        }
        /// <summary>
        /// 根据ID获取单个商品信息
        /// </summary>
        /// <returns></returns>
        public List<Product> GetProductByID(int Product_Id)
        {
            return DAL.GetProductByID(Product_Id);
        }
        /// <summary>
        /// 新增商品
        /// </summary>
        /// <returns></returns>
        public int AddProduct(Product po)
        {
            return DAL.AddProduct(po);
        }
        /// <summary>
        /// 根据编号删除商品信息
        /// </summary>
        /// <returns></returns>
        public int DelProductByID(int id)
        {
            return DAL.DelProductByID(id);
        }
       /// <summary>
        /// 根据商品名称获取商品库存信息
        /// </summary>
        /// <returns></returns>
        public string GetProductByName(int WareHose_Id, string Product_Name)
        {
            return DAL.GetProductByName(WareHose_Id, Product_Name);
          }
          
    }
}
